<?php 

    /* Author : IronLady */

?>
    <li><?php echo zen_draw_form('currencies_form', zen_href_link(basename(preg_replace('/.php/','', $PHP_SELF)), '', $request_type, false), 'get', 'id="currency-change"'); ?>
    <div id="currency-header" class="m-btn-group group-plain">
	<input type="hidden" name="currency" value="" />
	<?php foreach($currencies_array as $curr){ ?>
		<?php if($_SESSION['currency'] == $curr['id']){ ?>
			<a class="m-btn-plain dropdown-toggle small drp" data-toggle="dropdown" href="#"><?php echo $curr["text"]; ?> <span class="icon-angle-down"></span></a>
	    	<?php break; ?> 
		<?php } ?>
	<?php } ?>
	<ul class="m-dropdown-menu">
	<?php foreach ($currencies_array as $curr) { ?>
		<li><a onclick="$('input[name=\'currency\']').attr('value', '<?php echo $curr['id']; ?>'); $('#currency-change').submit();"><?php echo $curr['text']; ?></a></li>
    <?php } ?>
	</ul>
	<?php echo $hidden_get_variables . zen_hide_session_id(); ?>
    </div>
    </form></li>